package com.ruoyi.matrix.util

import java.lang.StringBuilder
import java.util.*

object RandomNameGenerator {
    fun generate(len: Int=8): String {
        val chars = ("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz")
        val rnd = Random()
        val sb = StringBuilder(len)
        for (i in 0 until len) sb.append(chars[rnd.nextInt(chars.length)])
        return sb.toString()
    }
}